package com.hgd.igreencar.controller;

import com.hgd.igreencar.biz.IBrandBiz;
import com.hgd.igreencar.entity.Brand;
import com.hgd.igreencar.entity.WebsiteUsers;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/brand")
public class BrandController {

    @Autowired
    private IBrandBiz brandBiz;

    /**
     * 新增品牌型号接口
     */
    @PostMapping("/add")
    public @ResponseBody String addBrand(Brand brand){
        int a = brandBiz.addBrand(brand);
        return a+" ";
    }

    /**
     * 删除品牌型号接口
     */
    @GetMapping("/delete")
    public @ResponseBody String deleteBrand(int brandId){
        int a = brandBiz.deleteBrand(brandId);
        return a+" ";
    }

    /**
     * 编辑品牌型号接口
     */
    @GetMapping("/edit")
    public @ResponseBody String editBrand(Brand brand){
        int a = brandBiz.editBrand(brand);
        return a+" ";
    }
}
